<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/8/24 0024
  Time: 18:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" pageEncoding="utf-8" %>
<%@ include file="/include/taglibs.jsp" %>
<script src="${path}/static/taoshunda/type/lifeType.js"></script>
<link href="${path}/static/css/public/public.css" rel="stylesheet" type="text/css">


<div style="float: left;margin-bottom: 7px;">
    <button type="button" class="btn btn-default-button entry" id="addWaiterType"  style="float: left;background-color: #3c8dbc;color: #fff">
        添加生活分类
    </button>
</div>

<div class="input-group col-xs-2" style="float: left;margin-bottom: 5px;margin-left: 4px">
    <input type="text" class="form-control entry" id="waiterName" placeholder="请在这里输入名称">
</div>
<div style="float: left;margin-bottom: 5px">
    <button type="button" class="btn query_button" onclick="queryWaiterName()" style="width: 100px;margin-left: 5px">
        <%--<span class="glyphicon glyphicon-search" aria-hidden="true"></span>--%>
        查询
    </button>
</div>


<table id="table"
       style="background-color:white"
       data-toggle="table"
       data-url="${path}/web/type/queryLifeType"
       data-toolbar="#toolbar"
       data-side-pagination="server"
       data-pagination="true"
       data-page-list="[5, 10, 20, 50, 100, 200]"
>
    <thead>
    <tr>
        <th data-field="id" data-visible="false">编号</th>
        <th data-field="waiterName">名称</th>
        <th data-formatter="showImage">图片</th>
        <th data-field="price">价格</th>
        <th data-formatter="isHome" data-events="operateIsHome">是否首页</th>
        <th data-formatter="sorting">排序</th>
        <th data-formatter="operateFormatter" data-events="operateEvents">操作</th>
    </tr>
    </thead>
</table>

<div id="addWaiterType-div" class="slidingmenu box-model box box-info" style="z-index:0;" model-width="35%" model-left="65%">
    <div class="box-header">
        <h3 class="box-title">添加生活分类</h3>
    </div>
    <form role="form" method="post" id="addWaiterTypeFrom">
        <div class="box-body">
            <label>分类名称:</label>
            <input type="text" class="form-control " name="waiterName" required="required" style="width: 50%" id="dumpWaiterName">
        </div>

        <div class="box-body">
            <label>分类排序:</label>
            <input type="text" class="form-control " name="sorting" id="sortings" required="required" style="width: 50%">
        </div>

        <div class="box-body">
            <label>服务年费:</label>
            <input type="text" class="form-control " name="price" id="price"  style="width: 50%">
        </div>



        <div class="box-body">
            <label>分类图片:</label><br/>
            <input type="hidden" id="waiterPic" name="waiterPic">
            <img id="img" class="addImage" src="${path}/static/images/commons/img_add.png"
                 width="150" height="150"><br><span style="color: red">推荐上传图片为800 x 800以上分辨率的图片</span>
        </div>
    </form>

    <div class="box-footer">
        <button class="btn btn-info" data-event="submit-addWaiterType">确定</button>
        &nbsp;
        <button class="btn btn-danger close-model">关闭</button>
    </div>
</div>


<div id="updateWaiterType-div" class="slidingmenu box-model box box-info" style="z-index:0;" model-width="35%" model-left="65%">
    <div class="box-header">
        <h3 class="box-title">修改分类</h3>
    </div>
    <form role="form" method="post" id="updateWaiterTypeFrom">
        <input id="id" name="id" type="hidden">

        <div class="box-body">
            <label>分类名称:</label>
            <input type="text" class="form-control " name="waiterName" id="typeName" required="required" style="width: 50%">
        </div>

        <div class="box-body">
            <label>服务年费:</label>
            <input type="text" class="form-control " name="price" id="updatePrice" required="required" style="width: 50%">
        </div>

        <div class="box-body">
            <label>分类图片:</label><br/>
            <input type="hidden" id="waiterPicUpdate" name="waiterPic">
            <img id="imgs" class="addImage" src="${path}/static/images/commons/img_add.png"
                  height="150"><br><span style="color: red">推荐上传图片为800 x 800以上分辨率的图片</span>
        </div>

    </form>

    <div class="box-footer">
        <button class="btn btn-info" data-event="submit-updateWaiterType">确定</button>
        &nbsp;
        <button class="btn btn-danger close-model">关闭</button>
    </div>
</div>


<div id="showSorting-div" class="slidingmenu box-model box box-info">
    <div class="box-header">
        <h3 class="box-title">修改排名顺序</h3>
    </div>
    <div class="box-body">
        <form role="form"  method="post" id="updateSortingFrom">
            <div class="form-group">
                <input type="hidden"  id="pid" name="id" >
                <input type="text" class="form-control required" id="sorting" name="sorting" >
            </div>
        </form>
    </div>
    <div class="box-footer">
        <button class="btn btn-info" data-event="merge-sorting">确定</button>
        &nbsp;
        <button class="btn btn-danger close-model">关闭</button>
    </div>
</div>

<div id="detailImage-div" style="z-index:999"  class="slidingmenu box-model box box-info">
    <div class="box box-info">
        <div class="box-body">
            <div class="form-group">
                <div id="image" style="margin-top: 5%">

                </div>
            </div>
            <div class="box-footer">
                <button class="btn btn-danger close-model">关闭</button>
            </div>
        </div><!-- /.box-body -->
    </div>
</div>